Methods
(static) renameKeysWith(renameFn) → {function}
- Source:
- Since:
- 0.9.0
- See:
Return a function expecting an object and returning a new object with keys renamed with the provided function.
Example
> rename = renameKeysWith(makePrefixed('--'))
> rename({foo: 1, bar: 2})
{'--foo': 1, '--bar': 2}
Parameters:
Name | Type | Description |
---|---|---|
renameFn |
function | (String -> String) the function renaming keys |
Returns:
- (Object -> Object) the function renaming the object keys
- Type
- function